package com.jeff.android.lab.module.thirdwidget;

import com.jeff.android.lab.BaseRecyclerViewFragment;
import com.jeff.android.lab.module.thirdwidget.marqueelayout.MarqueeLayoutFragment;
import com.jeff.android.lab.module.thirdwidget.smarttab.SmartTabFragment;
import com.jeff.android.lab.module.thirdwidget.stickyheader.StickyHeaderFragment;
import com.jeff.android.lab.module.thirdwidget.tangram.TangramFragment;
import com.jeff.android.lab.util.RouterUtil;

import java.util.ArrayList;
import java.util.List;

public class ThirdWidgetMainFragment extends BaseRecyclerViewFragment {

    @Override
    protected List<String> getData() {
        return new ArrayList<String>() {
            {
                add("SmartTab");
                add("Tangram");
                add("StickHeader");
                add("MarqueeLayout");
            }
        };
    }

    @Override
    protected void launch(String item) {
        if ("SmartTab".equals(item)) {
            RouterUtil.launchFragmentActivity(getContext(), SmartTabFragment.class);
        } else if ("Tangram".equals(item)) {
            RouterUtil.launchFragmentActivity(getContext(), TangramFragment.class);
        } else if ("StickHeader".equals(item)) {
            RouterUtil.launchFragmentActivity(getContext(), StickyHeaderFragment.class);
        } else if ("MarqueeLayout".equals(item)) {
            RouterUtil.launchFragmentActivity(getContext(), MarqueeLayoutFragment.class);
        }
    }

}
